package com.weishaoying.practice.web;

import com.weishaoying.practice.shiro.BccRealm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author WeiShaoying
 * @date 2017/12/27
 */
@Controller
public class ClearController {

    @Autowired
    private BccRealm customRealm;

    @RequestMapping("/clearCache")
    public String clearShiroCache() {
        //清除缓存，将来正常开发要在service调用customRealm.clearCached()
        customRealm.clearCached();
        return "success";
    }
}
